#ifndef _LOGIN_MANANGER_H_
#define _LOGIN_MANANGER_H_

#include <map>
#include <vector>
#include "mysql++.h"
#include "UserManager.h"
#include "CUser.h"

using namespace std;
using namespace mysqlpp;

#define NAME_MAX_SIZE 64

class CLoginManager
{
public:
	CLoginManager(mysqlpp::Connection* con);
	~CLoginManager();
	void Init();
	bool CheckUserLogin(char* userName, char* password);

private:

	
	struct LOGIN_INFO
	{
		char USER_NAME[NAME_MAX_SIZE];
		char PWD[16];
	
	};
	mysqlpp::Connection* m_pCon;
	std::vector<LOGIN_INFO>	m_vUserInfo;
public:	
	static CLoginManager* GetInstence();
	bool AddNewUser(int fd_sock);

private:
	static CLoginManager* s_ptr;
};



#endif
